<template>
  <div id="app">
    <keep-alive>
      <router-view v-if="$route.meta.keepAlive" />
    </keep-alive>
    <router-view v-if="!$route.meta.keepAlive" />
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  created(){
    if (sessionStorage.getItem("token")) {
      this.$store.commit("state_token", sessionStorage.getItem("token"));
    }else{
      this.$router.push({
        path:'/'
      })
    }
  }
};
</script>
<style>
* {
  margin: 0;
  padding: 0;
}
</style>